package com.jdk18.jdk8new;

/**
 * Created by xuyiwei on 2018/7/9.
 */
public class One {

    public static void main(String[] args) {
        Runnable r1 = () -> System.out.println("Hello World 1");
        Runnable r2 = new Runnable(){
            public void run(){
                System.out.println("Hello World 2");
            }
        };

        process(() -> System.out.println("Hello World 3"));

    }

    public static void process(Runnable r){
        r.run();
    }
}
